'use strict';

/**
 * @ngdoc service
 * @name appApp.onlineFac
 * @description
 * # onlineFac
 * Service in the appApp.
 */
angular.module('appApp')
  .service('onlineFac', function ($resource,cfg) {
    // AngularJS will instantiate a singleton by calling "new" on this function
    return {
      article: $resource(cfg.baseUrl + 'api/article/:action', {}, {
        'category': {method:'GET', params:{action:'category'},isArray:false},
        'categorylist': {method:'GET', params:{action:'categorylist'},isArray:false},//listId
        'articles': {method:'GET', params:{action:'articles'},isArray:false},//category_id,page,type(1:图文2:视频)
        'articledetail': {method:'GET', params:{action:'articledetail'},isArray:false},
        'addview': {method:'GET', params:{action:'addview'},isArray:false},
        'search': {method:'GET', params:{action:'search'},isArray:false},
        'faqlist': {method:'GET', params:{action:'faqlist'},isArray:false}//faqId
      })
    }
  });
